package model.agent;

import static org.junit.Assert.*

import org.codehaus.groovy.control.CompilerConfiguration
import org.junit.After
import org.junit.AfterClass
import org.junit.Before
import org.junit.BeforeClass
import org.junit.Test

class AgentBuilderTest {

	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
	}

	@AfterClass
	public static void tearDownAfterClass() throws Exception {
	}

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public final void test() {
		//fail("Not yet implemented"); // TODO
		AgentInitializer ai = new AgentInitializer("scripts/HouseHoldSettings.groovy")
		Random rnd = new Random(1)
		ai.rnd = rnd
		
		HouseHold h1 = new HouseHold()
		HouseHold h2 = new HouseHold()
		
		ai.init(h1)
		ai.init(h2)
		
		println h1.prop
		println h2.prop
		
		
	}

	//class ScriptBaseTest {

//	abstract class ScriptBaseTestScript extends Script {
//		def foo() {
//			"this is foo"
//		}
//	}
//	
//	@Test
//	void extend_groovy_script() {
//		def configuration = new CompilerConfiguration()
//		configuration.setScriptBaseClass("ScriptBaseTestScript")
//
//		def shell = new GroovyShell(this.class.classLoader, new Binding(), configuration)
//
//		assertEquals shell.evaluate("foo()"), "this is foo"
//	}
	//}


}
